Self Code Signing
  • Last updated on 1st Jun 2023

Generate self signed certificate pfx file from a windows machine or virtual machine

  1. open cmd.exe

  2. enter powershell and click enter

  3. Input the following code:

        $cert = New-SelfSignedCertificate -FriendlyName "Tauri Application Technologies" -CertStoreLocation Cert:\CurrentUser\My -Subject "CN=TauriAppTech" -Type CodeSigningCert
    
        $CertPassword = ConvertTo-SecureString -String "password" -Force -AsPlainText
    
        Export-PfxCertificate -Cert "cert:\CurrentUser\My\$($cert.Thumbprint)" -FilePath "C:\Users\<user-name>\Downloads\selfsigncert.pfx" -Password $CertPassword
    
    

Signing using osslsigncode

  1. install osslsigncode
    # ubuntu/debian
    sudo apt install osslsigncode

    # Arch Linux
    yay -S osslsigncode
  1. Sign executable using pre generated pfx file
    osslsigncode sign -pkcs12 selfsigncert.pfx -askpass -n "tauriApp" -i http://tauri.app/ -in tauriApp-x64.msi -out tauriApp-x64-signed.msi